#import <MBProgressHUD/MBProgressHUD.h>
NS_ASSUME_NONNULL_BEGIN
typedef void (^_Nullable HUDCompletionBlock)(void);
static NSTimeInterval const duration = 1.5;


@interface MBProgressHUD (Manager)
+ (void)createHudWithMsg:(NSString *)msg
                   delay:(NSTimeInterval)delay
                  toView:(UIView *_Nullable)view
                    icon:(id _Nullable)icon
         completionBlock:(HUDCompletionBlock)completionBlock;
#pragma mark - 在指定的view上显示hud
+ (void)showHUDMsg:(NSString *)msg toView:(UIView *_Nullable)view;
+ (void)showHUDMsg:(NSString *)msg toView:(UIView *_Nullable)view completionBlock:(HUDCompletionBlock)completionBlock;
+ (void)showHUDSucc:(NSString *)msg toView:(UIView *_Nullable)view;
+ (void)showHUDSucc:(NSString *)msg toView:(UIView *_Nullable)view completionBlock:(HUDCompletionBlock)completionBlock;
+ (void)showHUDError:(NSString *)msg toView:(UIView *_Nullable)view;
+ (void)showHUDError:(NSString *)msg toView:(UIView *_Nullable)view completionBlock:(HUDCompletionBlock)completionBlock;
+ (void)showHUDWarning:(NSString *)msg toView:(UIView *_Nullable)view;
+ (void)showHUDWarning:(NSString *)msg toView:(UIView *_Nullable)view completionBlock:(HUDCompletionBlock)completionBlock;
#pragma mark - 菊花加载
+ (MBProgressHUD *)showHUDActivityMsg:(NSString *_Nullable)msg;
+ (MBProgressHUD *)showHUDActivityMsg:(NSString *_Nullable)msg toView:(UIView *_Nullable)view;
#pragma mark - 进度加载
+ (MBProgressHUD *)showHUDProgressMsg:(NSString *_Nullable)msg toView:(UIView *_Nullable)view mode:(MBProgressHUDMode)mode;
#pragma mark 移除hud
+ (void)hideHUD;
+ (void)hideHUDForView:(UIView *_Nullable)view;
@end
NS_ASSUME_NONNULL_END
